package com.jr.service.impl;


import com.jr.entity.User;
import com.jr.mapper.UserMapper;
import com.jr.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
class UserServiceimpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    public UserMapper getUserMapper() {
        return userMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    public ArrayList<User> loginUser(User user) {
        return userMapper.loginUser(user);
    }

    public User finduseremail(String email) {
        return userMapper.finduseremail(email);
    }

    public User finduserphone(String phone) {
        return userMapper.finduserphone(phone);
    }

    @Override
    public int update2(User user) {
        return userMapper.update2(user);
    }
}

